package com.csi.jf.crucible.ptservice.model;

import com.chinasofti.ro.bizframework.core.data.validation.IValidator;
import com.chinasofti.ro.bizframework.core.orm.entity.Model;
import com.chinasofti.ro.bizframework.core.data.bind.CompositeKeyUtil;


/**
 * 
 * @author BizFoundation
 * @version 1.0
 * @since 1.0
 */
public class ToolservicesStatus extends Model implements IValidator {
	/**
     * serialVersionUID
     */
    private static final long serialVersionUID = 858691916281912661L;
    // Fields    
	private ToolservicesStatusPk toolservicesStatusPk; 
	private Integer status; 
		
	//default constructor
    public ToolservicesStatus() {
    	super();
    }
    
    // Property accessors
	public ToolservicesStatusPk getToolservicesStatusPk() {
        return this.toolservicesStatusPk;
    }
    
    public void setToolservicesStatusPk(ToolservicesStatusPk toolservicesStatusPk) {
    	this.toolservicesStatusPk = toolservicesStatusPk;
    }
    
	public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer status) {
    	this.firePropertyChange("status", this.status, status);
    	this.status = status;
    }
    
    public String getCompositeKeyStr() throws Exception{
    	return CompositeKeyUtil.getCompositeKey(getToolservicesStatusPk());
    }
       	public boolean validate(Object arg0) {
		//ToolservicesStatus toolservicesStatus = (ToolservicesStatus)arg0;
		//Validation.required("toolservicesStatus.toolservicesStatusPk",toolservicesStatus.getToolservicesStatusPk());
		return true;
	}
}